<template>
	<view>
		<HM-filterDropdown :menuTop="88" :filterData="filterData" :defaultSelected="defaultSelected"
			:updateMenuName="true" @confirm="confirm" dataFormat="Object"></HM-filterDropdown>
	</view>
</template>

<script>
	const data = [{
		"name": '单选',
		"type": 'radio',
		"submenu": [{
				"name": "优惠(单选)",
				"submenu": [{
						"name": "满减活动",
						"value": "7"
					},
					{
						"name": "打折优惠",
						"value": "8"
					},
					{
						"name": "会员专享",
						"value": "9"
					}
				]
			},
			{
				"name": "服务(单选)",
				"submenu": [{
						"name": "预定",
						"value": "1"
					},
					{
						"name": "点餐",
						"value": "2"
					},
					{
						"name": "外卖",
						"value": "3"
					}
				]
			},
			{
				"name": "价格(单选)",
				"submenu": [{
						"name": "50以下",
						"value": "4"
					},
					{
						"name": "50-100",
						"value": "5"
					},
					{
						"name": "100-300",
						"value": "6"
					}
				]
			}
		]
	}]
	export default {
		data() {
			return {
				defaultSelected: [],
				filterData: []
			};
		},
		onLoad: function() {
			//定时器模拟ajax异步请求数据
			setTimeout(() => {
				this.filterData = data;
			}, 100);
		},
		methods: {
			//接收菜单结果
			confirm(e) {
				// this.indexArr = e.index;
				// this.valueArr = e.value;

			},

		},
	}
</script>
<style lang="scss">
	
</style>